angular.module('jie', ['ionic'])

    .controller('LoginController', function ($scope, $http) {

        $scope.submit = function () {

            let data = {
                "nickName" : $scope.nickName,
                "password" : $scope.password
            };

            $http.post("/jie/login/check", data).then(
                function success(response) {
                    if(response.data.code == 0){
                        //window.location.href = "/jie";
                    }else{
                        alert("失败");
                    }
                },
                function error(response){
                    alert("请求失败");
                }
            );
        };
    });